package com.zangs.emqx_expand.emqx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zangs.emqx_expand.emqx.mapper.MqttAclMapper;
import com.zangs.emqx_expand.emqx.domain.MqttAcl;
import com.zangs.emqx_expand.emqx.service.IMqttAclService;

/**
 * MQTT 权限Service业务层处理
 * 
 * @author zangs
 * @since 2025-01-26
 */
@Service
public class MqttAclServiceImpl implements IMqttAclService 
{
    @Autowired
    private MqttAclMapper mqttAclMapper;

    /**
     * 查询MQTT 权限
     * 
     * @param id MQTT 权限主键
     * @return MQTT 权限
     */
    @Override
    public MqttAcl selectMqttAclById(Long id)
    {
        return mqttAclMapper.selectMqttAclById(id);
    }

    /**
     * 查询MQTT 权限列表
     * 
     * @param mqttAcl MQTT 权限
     * @return MQTT 权限
     */
    @Override
    public List<MqttAcl> selectMqttAclList(MqttAcl mqttAcl)
    {
        return mqttAclMapper.selectMqttAclList(mqttAcl);
    }

    /**
     * 新增MQTT 权限
     * 
     * @param mqttAcl MQTT 权限
     * @return 结果
     */
    @Override
    public int insertMqttAcl(MqttAcl mqttAcl)
    {
        return mqttAclMapper.insertMqttAcl(mqttAcl);
    }

    /**
     * 修改MQTT 权限
     * 
     * @param mqttAcl MQTT 权限
     * @return 结果
     */
    @Override
    public int updateMqttAcl(MqttAcl mqttAcl)
    {
        return mqttAclMapper.updateMqttAcl(mqttAcl);
    }

    /**
     * 批量删除MQTT 权限
     * 
     * @param ids 需要删除的MQTT 权限主键
     * @return 结果
     */
    @Override
    public int deleteMqttAclByIds(Long[] ids)
    {
        return mqttAclMapper.deleteMqttAclByIds(ids);
    }

    /**
     * 删除MQTT 权限信息
     * 
     * @param id MQTT 权限主键
     * @return 结果
     */
    @Override
    public int deleteMqttAclById(Long id)
    {
        return mqttAclMapper.deleteMqttAclById(id);
    }
}
